package com.rainner.admin.action;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import com.rainner.admin.action.base.JsonAction;

@Result(name="MainIndex",type="freemarker",location="/WEB-INF/content/main/index.ftl")
public class MainAction extends JsonAction{

	private static final long serialVersionUID = 1L;
	
	@Action("/main/index")
	public String mainIndex(){
		//获取主界面需要的数据,存放到map中.
		if(ServletActionContext.getRequest().getSession().getAttribute("username") != null){
			return "MainIndex";
		}
		return null;
	}
}
